# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-imp3
_pkgname=imp3
pkgver=0.1.4
pkgrel=3
pkgdesc='Interactive tool for image pre-processing and automated pipeline creation.'
arch=('any')
url='https://pypi.org/project/imp3/#files'
license=('custom:unknown')
depends=('python' 'python-matplotlib' 'python-numpy' 'python-pillow'
         'python-opencv' 'python-streamlit')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('f12a9db4951511935341463c72b1b88c6507c0bf8709412fd93d732bc339c6b8d7755a15418956d019d39ecd0b1ee21a82e412ccab73e879655919dded415bd4')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

